Allen Bradley CIP Message driver

PLC Communications Test

It is possible to test the configuration of the PLC device by ‘Pinging’ the PLC with either an ICMP (Internet Control Message Protocol) ping request or a PLC message ping. The ICMP ping tests that the PLC is reachable via the network and is a very basic connection check, the PLC ping request requires the PLC code to respond to an incoming message, so needs specific code within the PLC.

 

If you are running the RSLink Driver on the same machine that is communicating to Sym3 you will need to stop the RSLinx driver. Failure to do this will result in an Access violation error in the Sym3 logs. RSLinx uses the CIP port 44818 and can be started AFTER Sym3.

 

Example of PLC ping request code (RSLogix 5000)

 

 

 

Message Configuration

 

Example:

The following is an example of the configuration for an ‘AllenBradley’ PLC type:

NetworkByteOrder=0
ABCIPIPAddress=192.168.59.85
ABCIPPath=1.0
UseTrailer=0
UDT1=_HLCHeader:SINT,SINT,INT,INT,INT
RequestType1=150
ResponseSymbol1=Ping:_HLCHeader

 

The previous example of ‘AllenBradley’ configuration contains the lines:

UDT1=_HLCHeader:SINT,SINT,INT,INT,INT
RequestType1=150
ResponseSymbol1=Ping:_HLCHeader

 

The first line declares a UDT (User Defined Type) called _HLCHeader, this type is made up of the types following the colon, these can be primitive types within the PLC or other UDTs, the name and structure must correspond to a type defined within the PLC.

The second and third lines declares a message that will be sent to the PLC, the message Type ID is 150, it will be written to the PLC tag called ‘Ping’ and it will be an instance of the type _ HLCHeader.

The PLC tag is defined as:

The PLC must respond to the message in a timely manner or a timeout will occur. The response must be a reflection of the input, and sent to the sending IP address. In the above code example, the response is triggered by checking for a non-zero value within the tag Ping.PLCRef.

Pinging the PLC can be activated by right clicking on a PLC device within the project explorer and selecting the appropriate menu item, or via one of the buttons within the property explorer.

 

CIP Error Codes

1CIP Error 0x0001: Connection Failure
2CIP Error 0x0002: Insufficient resources
3CIP Error 0x0003: Value invalid
4CIP Error 0x0004: Malformed tag or tag does not exist
5CIP Error 0x0005: Unknown destination
6CIP Error 0x0006: Data requested would not fit in response packet
7CIP Error 0x0007: Loss of Connection
8CIP Error 0x0008: Unsupported service
9CIP Error 0x0009: Error in data segment or invalid attribute value
10CIP Error 0x000a: Attribute list error
11CIP Error 0x000b: State already exists
12CIP Error 0x000c: Object model conflict
13CIP Error 0x000d: Object already exists
14CIP Error 0x000e: Attribute not settable
15CIP Error 0x000f: Permission denied
16CIP Error 0x0010: Device state conflict
17CIP Error 0x0011: Reply too large
18CIP Error 0x0012: Fragment primitive
19CIP Error 0x0013: Insufficient command data or parameters specified to execute service
20CIP Error 0x0014: Attribute not supported
21CIP Error 0x0015: Too much data specified
26CIP Error 0x001a: Bridge request too large
27CIP Error 0x001b: Bridge response too large
28CIP Error 0x001c: Attribute list shortage
29CIP Error 0x001d: Invalid attribute list
30CIP Error 0x001f: Failure during connection
34CIP Error 0x0022: Invalid received
35CIP Error 0x0025: Key segment error
37CIP Error 0x0026: Number of IOI words specified does not match IOI word count
38CIP Error 0x0027: Unexpected attribute in list
255CIP Error 0x00ff: General Error
65792CIP Extended Error 0x00010100: Connection Failure - Connection in use
65795CIP Extended Error 0x00010103: Connection Failure - Transport not supported
65798CIP Extended Error 0x00010106: Connection Failure - Ownership conflict
65799CIP Extended Error 0x00010107: Connection Failure - Connection not found
65800CIP Extended Error 0x00010108: Connection Failure - Invalid connection type
65801CIP Extended Error 0x00010109: Connection Failure - Invalid connection size
65808CIP Extended Error 0x00010110: Connection Failure - Module not configured
65809CIP Extended Error 0x00010111: Connection Failure - ERP not supported
65812CIP Extended Error 0x00010114: Connection Failure - Wrong Module
65813CIP Extended Error 0x00010115: Connection Failure - Wrong Device Type
65814CIP Extended Error 0x00010116: Connection Failure - Wrong Revision
65816CIP Extended Error 0x00010118: Connection Failure - Invalid configuration format
65818CIP Extended Error 0x0001011a: Connection Failure - Application out of connections
66051CIP Extended Error 0x00010203: Connection Failure - Connection timeout
66052CIP Extended Error 0x00010204: Connection Failure - Unconnected message timeout
66053CIP Extended Error 0x00010205: Connection Failure -  Unconnected send parameter error
66054CIP Extended Error 0x00010206: Connection Failure - Message too large
66305CIP Extended Error 0x00010301: Connection Failure - No buffer memory
66306CIP Extended Error 0x00010302: Connection Failure - Bandwidth no available
66307CIP Extended Error 0x00010303: Connection Failure - No screeners available
66309CIP Extended Error 0x00010305: Connection Failure - Signature match
66321CIP Extended Error 0x00010311: Connection Failure - Port not available
66322CIP Extended Error 0x00010312: Connection Failure - Link address not available
66325CIP Extended Error 0x00010315: Connection Failure - Invalid segment type
66327CIP Extended Error 0x00010317: Connection Failure - Connection no scheduled
66328CIP Extended Error 0x00010318: Connection Failure - Link address to self is invalid
2032131CIP Extended Error 0x001f0203: Failure during connection - Connection timed out
16720132Embedded Service Error 0x00ff2104: The beginning offset was beyond the end of the template.
16720133Embedded Service Error 0x00ff2105: Attempt to access beyond the end of the data object.
16720134Embedded Service Error 0x00ff2106: Object data in use
16720135Embedded Service Error 0x00ff2107: The type does not match the data type of the data object.

 

Example Sym3 project using this driver.

This simple example includes some conveyors and PEs to demonstrate the setup and principles of operation

Sym3-NJ1-ABCIP.s3i - Example project

PLC-NJ1-ABCIP.acd - Example PLC code